<?php
session_start();
require_once dirname(__FILE__).'/GoogleClientApi/Google_Client.php';
require_once dirname(__FILE__).'/GoogleClientApi/contrib/Google_YouTubeService.php';

$scriptUri = "http://".$_SERVER["HTTP_HOST"]."/Index/oauth";
require_once 'Zend/Loader.php';
//$scopes="https://www.googleapis.com/auth/userinfo.profile";
 $frontController = Zend_Controller_Front::getInstance();
 $appConfig = $frontController->getParam('bootstrap')->getOptions();
$client = new Google_Client();
$client->setAccessType('offline'); // default: offline
$client->setApplicationName($appConfig['applicationName']);
$client->setClientId($appConfig['clientId']);
$client->setClientSecret($appConfig['clientSecret']);
$client->setDeveloperKey($appConfig['developerKey']); // API key
$client->setRedirectUri($scriptUri);








?>
